import React from 'react'
import Radio from '@/components/Radio'

interface BranchCateProps {
  name: string
  switchBranch: (val: any) => void
}

function BranchCate(props: BranchCateProps) {
  return (
    <div className='branchCate-radio-box'>
      <Radio
        name={props.name}
        label='综合'
        value='综合'
        checked={true}
        onChecked={() => {
          props.switchBranch('综合')
        }}
      />
      <Radio
        name={props.name}
        label='周榜'
        value='周榜'
        onChecked={() => {
          props.switchBranch('周榜')
        }}
      />
      <Radio
        name={props.name}
        label='月榜'
        value='月榜'
        onChecked={() => {
          props.switchBranch('月榜')
        }}
      />
      <Radio
        name={props.name}
        label='精华'
        value='精华'
        onChecked={() => {
          props.switchBranch('精华')
        }}
      />
    </div>
  )
}

export default BranchCate
